<template>
	<u-popup v-model="couponShow" mode="bottom" width="750rpx" :height="height" :border-radius="16"
			:mask-close-able="false">
			<view class="header_title">
				<view class="left">
					{{title}}
				</view>
				<u-icon name="close" size="34" color="#666666" @click="close"></u-icon>
			</view>
			<view class="flex-box" :style="{height:flexHeight}">
				<slot></slot>
			</view>
			<view class="bottom" v-if="btnShow">
				<view class="btn" @click="sure">
					{{btnSize}}
				</view>
			</view>
			<view class="bottomTwo" v-if="btnTwoShow">
				<view class="btn1" @click="up">
					{{upSize}}
				</view>
				<view class="btn2"  @click="down">
					{{downSize}}
				</view>
			</view>
	</u-popup>	
</template>
<script>
	export default{
		props: {
			downSize:{
				type: String,
				default: '',
				required: true
			},
			upSize:{
				type: String,
				default: '',
				required: true
			},
			btnSize:{
				type: String,
				default: '确认',
				required: true
			},
			couponShow: {
				type: Boolean,
				default: false,
				required: true
			},
			title:{
				type: String,
				default: '',
				required: true
			},
			btnShow:{
				type: Boolean,
				default: true,
				required: true
			},
			btnTwoShow:{
				type: Boolean,
				default: false,
				required: false
			},
			height:{
				type: String,
				default: '1080rpx',
				required: true
			},
			flexHeight:{
				type: String,
				default: '60vh',
				required: true
			}
		},
		methods:{
			close(){
				this.$emit('close', false)
			},
			sure(){
				this.$emit('sure', false)
			},
			up(){
				this.$emit('up')
			},
			down(){
				this.$emit('down')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header_title {
		padding: 30rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		
		.left {
			font-size: 36rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			text-align: left;
			color: #333333;
			flex: 1;
		}
	}
	.flex-box{
		width:100%;
		// height:60vh;
	}
	.bottom{
		width: 100%;
		height: 164rpx;
		padding-top: 24rpx;
		display: flex;
		justify-content: center;
		background: #ffffff;
		position: fixed;
		bottom: 0;
		z-index: 99;
		.btn{
			width: 710rpx;
			height: 88rpx;
			background: #73F0EA;
			border-radius: 16rpx;
			font-size: 34rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			color: #ffffff;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
	.bottomTwo{
		width: 100%;
		height: 164rpx;
		padding-top: 24rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		background: #ffffff;
		position: fixed;
		bottom: 0;
		z-index: 99;
		.btn1{
			width: 346rpx;
			height: 88rpx;
			border: 1rpx solid #73F0EA;
			border-radius: 16rpx;
			font-size: 34rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			text-align: center;
			color: #73F0EA;
			display: flex;
			align-items: center;
			justify-content: center;
		}
		.btn2{
			width: 346rpx;
			height: 88rpx;
			background: #73F0EA;
			border-radius: 16rpx;
			font-size: 34rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			text-align: center;
			color: #ffffff;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
	
	

</style>